



<template>
  <div class="demo">
    <div>
      <router-link to="/home" class="tab-button">Home</router-link>
      <router-link to="/posts" class="tab-button">Posts</router-link>
      <router-link to="/archive" class="tab-button">Archive</router-link>
      <router-view></router-view>
    </div>
  </div>
</template>

<style scoped>
.router-link-active {
  background-color: yellow;
  color: #000;
}

.demo {
  width: 500px;
  font-family: sans-serif;
  border: 1px solid #eee;
  border-radius: 2px;
  padding: 20px 30px;
  margin-top: 1em;
  margin-bottom: 40px;
  overflow-x: auto;
}

.tab-button {
  padding: 6px 10px;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  border: 1px solid #ccc;
  cursor: pointer;

  margin-bottom: -1px;
  margin-right: -1px;
}

.tab-button:hover {
  background: #e0e0e0;
}

.tab-button.active {
  background: #e0e0e0;
}

.tab {
  border: 1px solid #ccc;
  padding: 10px;
}
</style>